// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';

// 注册
import register from '@/views/register';
// 首页
import index from '@/views/index';


//信息嵌入
import Insert from '@/views/msg/insert'
//信息提取
import Extract from '@/views/msg/extract'
//用户信息
import UserInfo from '@/views/msg/userInfo'
// 信息嵌入记录表
import InsertList from '@/views/msg/insertlist'
// 信息提取记录表
import ExtractList from '@/views/msg/extractlist'

import ImageCompare from '@/views/msg/imageCompare'

// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
      }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    },
    {
        path: '/register',
        name: '注册',
        component: register,
        hidden: true,
        meta: {
            requireAuth: false
        }
    },{
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/msg/insert',
            name: '信息嵌入',
            component: Insert,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/msg/extract',
            name: '信息提取',
            component: Extract,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/msg/insertlist',
            name: '信息嵌入表',
            component: InsertList,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/msg/extractlist',
            name: '信息提取',
            component: ExtractList,
            meta: {
                requireAuth: true
            }
        },
          {
            path: '/msg/imageCompare',
            name: '图片对比',
            component: ImageCompare,
            meta: {
              requireAuth: true
            }
          },
        {
            path: '/msg/userInfo',
            name: '用户信息',
            component: UserInfo,
            meta: {
                requireAuth: true
            }
        }
        ]
    }]
})
